package vis.app;

import javax.swing.JFrame;
import javax.swing.JPanel;

import processing.core.PApplet;
import vis.ds.stack.StackSketch;

public class DisplayFrame extends JFrame {
	private static final long serialVersionUID = 3034270112352683049L;
	public static final int WORLD_WIDTH = 640;
	public static final int WORLD_HEIGHT = 480;
	public static final int WORLD_GAP = 150;

	public DisplayFrame() {
		setSize(WORLD_WIDTH, WORLD_HEIGHT); // The window Dimensions
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		javax.swing.JPanel panel = new JPanel();
		panel.setBounds(20, 20, 600, 600);
		PApplet sketch = new StackSketch("");
		panel.add(sketch);
		this.add(panel);
		sketch.init(); // this is the function used to start the execution
						// of the sketch
		this.setVisible(true);
	}

	public static void main(String[] args) {
		new DisplayFrame().setVisible(true);
	}
}
